#include "updateresthread.h"

UpdateResThread::UpdateResThread(QObject *parent) :
    QThread(parent)
{
    i = 0;
    iscontinue = true;
}
UpdateResThread::~UpdateResThread(){
    iscontinue = false;
    wait();
}

void UpdateResThread::startRes(){
    iscontinue = true;
    start();
}
void UpdateResThread::stopRes(){
    iscontinue = false;
}

void UpdateResThread::run(){
    while(iscontinue){
        i++;
        ResModel res;
        res.sizeView=QString::number(i);
        emit updateRes(res);
        msleep(1);
    }
    return ;
    //exec();
}
